import { defineStore } from 'pinia'
import { ref } from 'vue'

// 用户模块 token setToken removeToken
export const useArgStore = defineStore(
    'wryyyyy',
    () => {
        const row = ref(0)
        const col = ref(0)
        const args = ref([])
        const getArgs = () => {
            return args.value
        }
        const setArgs = (newArgs) => {
            args.value = newArgs
        }

        const tableHead = ref([])
        const getTableHead = () => {
            return tableHead.value
        }
        const setTableHead = (newHead) => {
            tableHead.value = newHead
        }

        return {
            row,
            col,
            args,
            getArgs,
            setArgs,
            tableHead,
            getTableHead,
            setTableHead
        }
    },
    {
        persist: true
    }
)